#ifndef STAR_HH_
#define STAR_HH_
#include "World.hh"
#include "Planet.hh"
#include "../Geom/Vector.hh"
#include <boost/noncopyable.hpp>

class World::Star: boost::noncopyable {
    public: typedef QMap< u1, spPlanet > PlanetMap;

    public: static spStar construct(u8 id, spGalaxy galaxy);

    protected: mutable QMutex lock;

    public: u8 const id;

    protected: wpGalaxy galaxy;

    protected: PlanetMap planets;

    public: Geom::Vector< double > const position;

    protected:
    Star(u8 id, Geom::Vector< double > const& position, spGalaxy galaxy);

    public: void next_turn();

    public: spPlanet get_planet(u1 distance) const;
    public: PlanetMap get_planets() const;
};

#endif // ndef STAR_HH_
